import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login'//登录页面
import layout from '@/view/layout/layout'
//import orderSearch from '@/views/orderManage/orderSearch'//订单查询页面



Vue.use(Router)

export default new Router({
	mode: 'history',
	base:"/manage",
	routes: [
		{
			path: '/',
			redirect:'/login',     //  后期上线改为login
		},
		{  // 用户登录页面
			path: '/login',
			name: 'login',
			component: login
		},
		{
			path: "/layout",
			name: 'layout',
			component: layout
		},
		{//主页--可视化--
			path: '/403',
			component: layout,
			name: "home",
			meta: {requireAuth: true},
			children: [
			/**{
				path: '/index',
				component: () => import('@/view/home/index.vue')
			},**/
			{
				path: '/403',
				component: () => import('@/view/403.vue')
			}]
		},
		{//车辆信息管理
			path: '/car',
			component: layout,//继承layout
			name: 'car',
			meta: {requireAuth: true},
			children: [
			{
				path: '/user/permissions',
				component: () => import('@/view/system/permissions')
			}]
		},
		{//用户管理
			path: '/user/list',		//系统管理-账户列表
			component: layout,//继承layout
			name: 'user/list',
			meta: {requireAuth: true},
			children: [{
				path: '/user/list',
				component: () => import('@/view/user/register')
			},
			{
				path: '/user/permissions',	//系统管理-权限控制
				component: () => import('@/view/system/permissions.vue')
			}]
		},
		{
			path: '/data_analysis',	//数据分析
			component: layout,
			name: 'dataAnalysis',
			meta: {requireAuth: true},
			children: [{
				path: '/data_analysis',		//数据分析
				component: () => import('@/view/dataAnalysis/index')
			}]
		},


		//	new
		{//系统管理
			path: '/user_manage',
			component: layout,//继承layout
			name: 'user_manage',
			meta: {requireAuth: true},
			children: [{
				path: '/user_manage',	//用户管理
				component: () => import('@/view/systematic/user_manage/index.vue')
			},{
				path: '/role_manage',	//	角色管理
				component: () => import('@/view/systematic/role_manage/index.vue')
			},{
				path: '/unit_manage',	//单位管理
				component: () => import('@/view/systematic/unit_manage/index.vue')
			},{
				path: '/group_manage', //	小组管理
				component: () => import('@/view/systematic/group_manage/index.vue')
			}]
		},
		{//人员管理
			path: '/gong_hai',
			component: layout,
			name: 'gong_hai',
			meta: {requireAuth: true},
			children: [{
				path: '/gong_hai',	//公海
				component: () => import('@/view/systematic/gong_hai/index.vue')
			},{
				path: '/qiu_zhi',	//	求职者
				component: () => import('@/view/systematic/qiu_zhi/index.vue')
			},{
				path: '/resource_manage',//	资源管理
				component: () => import('@/view/systematic/resource_manage/index.vue')
			},{
				path: '/dept_manage', //	部门管理
				component: () => import('@/view/systematic/dept_manage/index.vue')
			},{
				path: '/interview', //	面试
				component: () => import('@/view/systematic/interview/index.vue')
			}]
		},
	]

})
